Optimal. Leaf size=543 \[ -\frac {52 b^2 d f n^2}{27 x}-\frac {4}{27} b^2 d^{3/2} f^{3/2} n^2 \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right )-\frac {16 b d f n \left (a+b \log \left (c x^n\right )\right )}{9 x}-\frac {4}{9} b d^{3/2} f^{3/2} n \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right ) \left (a+b \log \left (c x^n\right )\right )-\frac {2 d f \left (a+b \log \left (c x^n\right )\right )^2}{3 x}+\frac {1}{3} (-d)^{3/2} f^{3/2} \left (a+b \log \left (c x^n\right )\right )^2 \log \left (1-\sqrt {-d} \sqrt {f} x\right )-\frac {1}{3} (-d)^{3/2} f^{3/2} \left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+\sqrt {-d} \sqrt {f} x\right )-\frac {2 b^2 n^2 \log \left (1+d f x^2\right )}{27 x^3}-\frac {2 b n \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )}{9 x^3}-\frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+d f x^2\right )}{3 x^3}-\frac {2}{3} b (-d)^{3/2} f^{3/2} n \left (a+b \log \left (c x^n\right )\right ) \text {Li}_2\left (-\sqrt {-d} \sqrt {f} x\right )+\frac {2}{3} b (-d)^{3/2} f^{3/2} n \left (a+b \log \left (c x^n\right )\right ) \text {Li}_2\left (\sqrt {-d} \sqrt {f} x\right )+\frac {2}{9} i b^2 d^{3/2} f^{3/2} n^2 \text {Li}_2\left (-i \sqrt {d} \sqrt {f} x\right )-\frac {2}{9} i b^2 d^{3/2} f^{3/2} n^2 \text {Li}_2\left (i \sqrt {d} \sqrt {f} x\right )+\frac {2}{3} b^2 (-d)^{3/2} f^{3/2} n^2 \text {Li}_3\left (-\sqrt {-d} \sqrt {f} x\right )-\frac {2}{3} b^2 (-d)^{3/2} f^{3/2} n^2 \text {Li}_3\left (\sqrt {-d} \sqrt {f} x\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.53, antiderivative size = 543, normalized size of antiderivative = 1.00, number of
steps used = 22, number of rules used = 14, integrand size = 28, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used
= {2342, 2341, 2425, 331, 209, 2380, 2361, 12, 4940, 2438, 2367, 2354, 2421, 6724}
\begin {gather*} -\frac {2}{3} b (-d)^{3/2} f^{3/2} n \text {PolyLog}\left (2,-\sqrt {-d} \sqrt {f} x\right ) \left (a+b \log \left (c x^n\right )\right )+\frac {2}{3} b (-d)^{3/2} f^{3/2} n \text {PolyLog}\left (2,\sqrt {-d} \sqrt {f} x\right ) \left (a+b \log \left (c x^n\right )\right )+\frac {2}{9} i b^2 d^{3/2} f^{3/2} n^2 \text {PolyLog}\left (2,-i \sqrt {d} \sqrt {f} x\right )-\frac {2}{9} i b^2 d^{3/2} f^{3/2} n^2 \text {PolyLog}\left (2,i \sqrt {d} \sqrt {f} x\right )+\frac {2}{3} b^2 (-d)^{3/2} f^{3/2} n^2 \text {PolyLog}\left (3,-\sqrt {-d} \sqrt {f} x\right )-\frac {2}{3} b^2 (-d)^{3/2} f^{3/2} n^2 \text {PolyLog}\left (3,\sqrt {-d} \sqrt {f} x\right )-\frac {4}{9} b d^{3/2} f^{3/2} n \text {ArcTan}\left (\sqrt {d} \sqrt {f} x\right ) \left (a+b \log \left (c x^n\right )\right )+\frac {1}{3} (-d)^{3/2} f^{3/2} \log \left (1-\sqrt {-d} \sqrt {f} x\right ) \left (a+b \log \left (c x^n\right )\right )^2-\frac {1}{3} (-d)^{3/2} f^{3/2} \log \left (\sqrt {-d} \sqrt {f} x+1\right ) \left (a+b \log \left (c x^n\right )\right )^2-\frac {16 b d f n \left (a+b \log \left (c x^n\right )\right )}{9 x}-\frac {2 d f \left (a+b \log \left (c x^n\right )\right )^2}{3 x}-\frac {2 b n \log \left (d f x^2+1\right ) \left (a+b \log \left (c x^n\right )\right )}{9 x^3}-\frac {\log \left (d f x^2+1\right ) \left (a+b \log \left (c x^n\right )\right )^2}{3 x^3}-\frac {4}{27} b^2 d^{3/2} f^{3/2} n^2 \text {ArcTan}\left (\sqrt {d} \sqrt {f} x\right )-\frac {2 b^2 n^2 \log \left (d f x^2+1\right )}{27 x^3}-\frac {52 b^2 d f n^2}{27 x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 209
Rule 331
Rule 2341
Rule 2342
Rule 2354
Rule 2361
Rule 2367
Rule 2380
Rule 2421
Rule 2425
Rule 2438
Rule 4940
Rule 6724
Rubi steps
\begin {align*} \int \frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (d \left (\frac {1}{d}+f x^2\right )\right )}{x^4} \, dx &=-\frac {2 b^2 n^2 \log \left (1+d f x^2\right )}{27 x^3}-\frac {2 b n \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )}{9 x^3}-\frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+d f x^2\right )}{3 x^3}-(2 f) \int \left (-\frac {2 b^2 d n^2}{27 x^2 \left (1+d f x^2\right )}-\frac {2 b d n \left (a+b \log \left (c x^n\right )\right )}{9 x^2 \left (1+d f x^2\right )}-\frac {d \left (a+b \log \left (c x^n\right )\right )^2}{3 x^2 \left (1+d f x^2\right )}\right ) \, dx\\ &=-\frac {2 b^2 n^2 \log \left (1+d f x^2\right )}{27 x^3}-\frac {2 b n \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )}{9 x^3}-\frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+d f x^2\right )}{3 x^3}+\frac {1}{3} (2 d f) \int \frac {\left (a+b \log \left (c x^n\right )\right )^2}{x^2 \left (1+d f x^2\right )} \, dx+\frac {1}{9} (4 b d f n) \int \frac {a+b \log \left (c x^n\right )}{x^2 \left (1+d f x^2\right )} \, dx+\frac {1}{27} \left (4 b^2 d f n^2\right ) \int \frac {1}{x^2 \left (1+d f x^2\right )} \, dx\\ &=-\frac {4 b^2 d f n^2}{27 x}-\frac {2 b^2 n^2 \log \left (1+d f x^2\right )}{27 x^3}-\frac {2 b n \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )}{9 x^3}-\frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+d f x^2\right )}{3 x^3}+\frac {1}{3} (2 d f) \int \left (\frac {\left (a+b \log \left (c x^n\right )\right )^2}{x^2}-\frac {d f \left (a+b \log \left (c x^n\right )\right )^2}{1+d f x^2}\right ) \, dx+\frac {1}{9} (4 b d f n) \int \left (\frac {a+b \log \left (c x^n\right )}{x^2}-\frac {d f \left (a+b \log \left (c x^n\right )\right )}{1+d f x^2}\right ) \, dx-\frac {1}{27} \left (4 b^2 d^2 f^2 n^2\right ) \int \frac {1}{1+d f x^2} \, dx\\ &=-\frac {4 b^2 d f n^2}{27 x}-\frac {4}{27} b^2 d^{3/2} f^{3/2} n^2 \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right )-\frac {2 b^2 n^2 \log \left (1+d f x^2\right )}{27 x^3}-\frac {2 b n \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )}{9 x^3}-\frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+d f x^2\right )}{3 x^3}+\frac {1}{3} (2 d f) \int \frac {\left (a+b \log \left (c x^n\right )\right )^2}{x^2} \, dx-\frac {1}{3} \left (2 d^2 f^2\right ) \int \frac {\left (a+b \log \left (c x^n\right )\right )^2}{1+d f x^2} \, dx+\frac {1}{9} (4 b d f n) \int \frac {a+b \log \left (c x^n\right )}{x^2} \, dx-\frac {1}{9} \left (4 b d^2 f^2 n\right ) \int \frac {a+b \log \left (c x^n\right )}{1+d f x^2} \, dx\\ &=-\frac {16 b^2 d f n^2}{27 x}-\frac {4}{27} b^2 d^{3/2} f^{3/2} n^2 \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right )-\frac {4 b d f n \left (a+b \log \left (c x^n\right )\right )}{9 x}-\frac {4}{9} b d^{3/2} f^{3/2} n \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right ) \left (a+b \log \left (c x^n\right )\right )-\frac {2 d f \left (a+b \log \left (c x^n\right )\right )^2}{3 x}-\frac {2 b^2 n^2 \log \left (1+d f x^2\right )}{27 x^3}-\frac {2 b n \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )}{9 x^3}-\frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+d f x^2\right )}{3 x^3}-\frac {1}{3} \left (2 d^2 f^2\right ) \int \left (\frac {\left (a+b \log \left (c x^n\right )\right )^2}{2 \left (1-\sqrt {-d} \sqrt {f} x\right )}+\frac {\left (a+b \log \left (c x^n\right )\right )^2}{2 \left (1+\sqrt {-d} \sqrt {f} x\right )}\right ) \, dx+\frac {1}{3} (4 b d f n) \int \frac {a+b \log \left (c x^n\right )}{x^2} \, dx+\frac {1}{9} \left (4 b^2 d^2 f^2 n^2\right ) \int \frac {\tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right )}{\sqrt {d} \sqrt {f} x} \, dx\\ &=-\frac {52 b^2 d f n^2}{27 x}-\frac {4}{27} b^2 d^{3/2} f^{3/2} n^2 \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right )-\frac {16 b d f n \left (a+b \log \left (c x^n\right )\right )}{9 x}-\frac {4}{9} b d^{3/2} f^{3/2} n \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right ) \left (a+b \log \left (c x^n\right )\right )-\frac {2 d f \left (a+b \log \left (c x^n\right )\right )^2}{3 x}-\frac {2 b^2 n^2 \log \left (1+d f x^2\right )}{27 x^3}-\frac {2 b n \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )}{9 x^3}-\frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+d f x^2\right )}{3 x^3}-\frac {1}{3} \left (d^2 f^2\right ) \int \frac {\left (a+b \log \left (c x^n\right )\right )^2}{1-\sqrt {-d} \sqrt {f} x} \, dx-\frac {1}{3} \left (d^2 f^2\right ) \int \frac {\left (a+b \log \left (c x^n\right )\right )^2}{1+\sqrt {-d} \sqrt {f} x} \, dx+\frac {1}{9} \left (4 b^2 d^{3/2} f^{3/2} n^2\right ) \int \frac {\tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right )}{x} \, dx\\ &=-\frac {52 b^2 d f n^2}{27 x}-\frac {4}{27} b^2 d^{3/2} f^{3/2} n^2 \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right )-\frac {16 b d f n \left (a+b \log \left (c x^n\right )\right )}{9 x}-\frac {4}{9} b d^{3/2} f^{3/2} n \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right ) \left (a+b \log \left (c x^n\right )\right )-\frac {2 d f \left (a+b \log \left (c x^n\right )\right )^2}{3 x}+\frac {1}{3} (-d)^{3/2} f^{3/2} \left (a+b \log \left (c x^n\right )\right )^2 \log \left (1-\sqrt {-d} \sqrt {f} x\right )-\frac {1}{3} (-d)^{3/2} f^{3/2} \left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+\sqrt {-d} \sqrt {f} x\right )-\frac {2 b^2 n^2 \log \left (1+d f x^2\right )}{27 x^3}-\frac {2 b n \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )}{9 x^3}-\frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+d f x^2\right )}{3 x^3}-\frac {1}{3} \left (2 b (-d)^{3/2} f^{3/2} n\right ) \int \frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (1-\sqrt {-d} \sqrt {f} x\right )}{x} \, dx+\frac {1}{3} \left (2 b (-d)^{3/2} f^{3/2} n\right ) \int \frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (1+\sqrt {-d} \sqrt {f} x\right )}{x} \, dx+\frac {1}{9} \left (2 i b^2 d^{3/2} f^{3/2} n^2\right ) \int \frac {\log \left (1-i \sqrt {d} \sqrt {f} x\right )}{x} \, dx-\frac {1}{9} \left (2 i b^2 d^{3/2} f^{3/2} n^2\right ) \int \frac {\log \left (1+i \sqrt {d} \sqrt {f} x\right )}{x} \, dx\\ &=-\frac {52 b^2 d f n^2}{27 x}-\frac {4}{27} b^2 d^{3/2} f^{3/2} n^2 \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right )-\frac {16 b d f n \left (a+b \log \left (c x^n\right )\right )}{9 x}-\frac {4}{9} b d^{3/2} f^{3/2} n \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right ) \left (a+b \log \left (c x^n\right )\right )-\frac {2 d f \left (a+b \log \left (c x^n\right )\right )^2}{3 x}+\frac {1}{3} (-d)^{3/2} f^{3/2} \left (a+b \log \left (c x^n\right )\right )^2 \log \left (1-\sqrt {-d} \sqrt {f} x\right )-\frac {1}{3} (-d)^{3/2} f^{3/2} \left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+\sqrt {-d} \sqrt {f} x\right )-\frac {2 b^2 n^2 \log \left (1+d f x^2\right )}{27 x^3}-\frac {2 b n \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )}{9 x^3}-\frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+d f x^2\right )}{3 x^3}-\frac {2}{3} b (-d)^{3/2} f^{3/2} n \left (a+b \log \left (c x^n\right )\right ) \text {Li}_2\left (-\sqrt {-d} \sqrt {f} x\right )+\frac {2}{3} b (-d)^{3/2} f^{3/2} n \left (a+b \log \left (c x^n\right )\right ) \text {Li}_2\left (\sqrt {-d} \sqrt {f} x\right )+\frac {2}{9} i b^2 d^{3/2} f^{3/2} n^2 \text {Li}_2\left (-i \sqrt {d} \sqrt {f} x\right )-\frac {2}{9} i b^2 d^{3/2} f^{3/2} n^2 \text {Li}_2\left (i \sqrt {d} \sqrt {f} x\right )+\frac {1}{3} \left (2 b^2 (-d)^{3/2} f^{3/2} n^2\right ) \int \frac {\text {Li}_2\left (-\sqrt {-d} \sqrt {f} x\right )}{x} \, dx-\frac {1}{3} \left (2 b^2 (-d)^{3/2} f^{3/2} n^2\right ) \int \frac {\text {Li}_2\left (\sqrt {-d} \sqrt {f} x\right )}{x} \, dx\\ &=-\frac {52 b^2 d f n^2}{27 x}-\frac {4}{27} b^2 d^{3/2} f^{3/2} n^2 \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right )-\frac {16 b d f n \left (a+b \log \left (c x^n\right )\right )}{9 x}-\frac {4}{9} b d^{3/2} f^{3/2} n \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right ) \left (a+b \log \left (c x^n\right )\right )-\frac {2 d f \left (a+b \log \left (c x^n\right )\right )^2}{3 x}+\frac {1}{3} (-d)^{3/2} f^{3/2} \left (a+b \log \left (c x^n\right )\right )^2 \log \left (1-\sqrt {-d} \sqrt {f} x\right )-\frac {1}{3} (-d)^{3/2} f^{3/2} \left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+\sqrt {-d} \sqrt {f} x\right )-\frac {2 b^2 n^2 \log \left (1+d f x^2\right )}{27 x^3}-\frac {2 b n \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )}{9 x^3}-\frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+d f x^2\right )}{3 x^3}-\frac {2}{3} b (-d)^{3/2} f^{3/2} n \left (a+b \log \left (c x^n\right )\right ) \text {Li}_2\left (-\sqrt {-d} \sqrt {f} x\right )+\frac {2}{3} b (-d)^{3/2} f^{3/2} n \left (a+b \log \left (c x^n\right )\right ) \text {Li}_2\left (\sqrt {-d} \sqrt {f} x\right )+\frac {2}{9} i b^2 d^{3/2} f^{3/2} n^2 \text {Li}_2\left (-i \sqrt {d} \sqrt {f} x\right )-\frac {2}{9} i b^2 d^{3/2} f^{3/2} n^2 \text {Li}_2\left (i \sqrt {d} \sqrt {f} x\right )+\frac {2}{3} b^2 (-d)^{3/2} f^{3/2} n^2 \text {Li}_3\left (-\sqrt {-d} \sqrt {f} x\right )-\frac {2}{3} b^2 (-d)^{3/2} f^{3/2} n^2 \text {Li}_3\left (\sqrt {-d} \sqrt {f} x\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.35, size = 585, normalized size = 1.08 \begin {gather*} \frac {1}{27} \left (-2 d^{3/2} f^{3/2} \tan ^{-1}\left (\sqrt {d} \sqrt {f} x\right ) \left (9 a^2+6 a b n+2 b^2 n^2+18 a b \left (-n \log (x)+\log \left (c x^n\right )\right )+6 b^2 n \left (-n \log (x)+\log \left (c x^n\right )\right )+9 b^2 \left (-n \log (x)+\log \left (c x^n\right )\right )^2\right )-\frac {2 d f \left (9 a^2+6 a b n+2 b^2 n^2+9 b^2 n^2 \log ^2(x)+6 b (3 a+b n) \log \left (c x^n\right )+9 b^2 \log ^2\left (c x^n\right )-6 b n \log (x) \left (3 a+b n+3 b \log \left (c x^n\right )\right )\right )}{x}-\frac {\left (9 a^2+6 a b n+2 b^2 n^2+6 b (3 a+b n) \log \left (c x^n\right )+9 b^2 \log ^2\left (c x^n\right )\right ) \log \left (1+d f x^2\right )}{x^3}+\frac {6 i b d f n \left (3 a+b n-3 b n \log (x)+3 b \log \left (c x^n\right )\right ) \left (2 i+2 i \log (x)+\sqrt {d} \sqrt {f} x \left (\log (x) \log \left (1+i \sqrt {d} \sqrt {f} x\right )+\text {Li}_2\left (-i \sqrt {d} \sqrt {f} x\right )\right )-\sqrt {d} \sqrt {f} x \left (\log (x) \log \left (1-i \sqrt {d} \sqrt {f} x\right )+\text {Li}_2\left (i \sqrt {d} \sqrt {f} x\right )\right )\right )}{x}+\frac {9 i b^2 d f n^2 \left (4 i+4 i \log (x)+2 i \log ^2(x)+\sqrt {d} \sqrt {f} x \left (\log ^2(x) \log \left (1+i \sqrt {d} \sqrt {f} x\right )+2 \log (x) \text {Li}_2\left (-i \sqrt {d} \sqrt {f} x\right )-2 \text {Li}_3\left (-i \sqrt {d} \sqrt {f} x\right )\right )-\sqrt {d} \sqrt {f} x \left (\log ^2(x) \log \left (1-i \sqrt {d} \sqrt {f} x\right )+2 \log (x) \text {Li}_2\left (i \sqrt {d} \sqrt {f} x\right )-2 \text {Li}_3\left (i \sqrt {d} \sqrt {f} x\right )\right )\right )}{x}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.01, size = 0, normalized size = 0.00 \[\int \frac {\left (a +b \ln \left (c \,x^{n}\right )\right )^{2} \ln \left (d \left (\frac {1}{d}+f \,x^{2}\right )\right )}{x^{4}}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {\ln \left (d\,\left (f\,x^2+\frac {1}{d}\right )\right )\,{\left (a+b\,\ln \left (c\,x^n\right )\right )}^2}{x^4} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________